package net.schastny.shopmanager.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import net.schastny.shopmanager.dao.OrderDAO;
import net.schastny.shopmanager.domain.Order;

@Service
public class OrderServiceImpl implements OrderService {
	@Autowired
    private OrderDAO orderDAO;
	
	@Transactional
	public void addOrder(Integer pid, Order order) {
		// TODO Auto-generated method stub
		orderDAO.addOrder(pid,order);
	}
	@Transactional
	public List<Order> listOrder() {
		return orderDAO.listOrder();
	}
	@Transactional
	public void removeOrder(Integer id) {
		// TODO Auto-generated method stub

	}
	@Transactional
	public Order getOrder(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}
	@Transactional
	public void editOrder(Order Order) {
		// TODO Auto-generated method stub

	}
	@Transactional
	public List<Order> getAll(Integer pid) {
		// TODO Auto-generated method stub
		return orderDAO.getAll(pid);
	}
	

	

}
